<?php
	class  quangcaobs
	{	
		public $MaQuangCao	=0;
		public $TenKhachHang ="";
		public $HinhAnh		="";
		public $DiaChi		="";
		public $XuatBan = 0;
		
		public function Them() 
		{
			$db =new quangcaodb();
			return $db->Them($this->TenKhachHang, 
							 $this->HinhAnh, 
							 $this->DiaChi,
							 $this->XuatBan);
		}
		
		public function CapNhatXuatBan()
		{
			$db = new quangcaodb();
			return $db->CapNhatXuatBan($this->MaQuangCao, 
									   $this->XuatBan);
		}
		
		public function CapNhat() 
		{
			$db =new quangcaodb();
			return $db->CapNhat($this->MaQuangCao,
								$this->TenKhachHang, 
								$this->HinhAnh, 
								$this->DiaChi);
		}
		public function Xoa() 
		{
			$db =new quangcaodb();
			return $db->Xoa($this->MaQuangCao);
		}
		
		public function XoaTatCa()
		{
			$db = new quangcaodb();
			return $db->XoaTatCa();
		}
				
		public function LayDanhSach() 
		{
			$db =new quangcaodb();
			return $db->LayDanhSach($this->MaQuangCao,
									$this->TenKhachHang,
									$this->DiaChi,
									$this->XuatBan);
		}
	}
?>